﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using XStudio.XCRF.Resources.Items;

namespace XStudio.XCRF.Web.Models.Items
{
    public class KPSInfo
    {
        private static IEnumerable<SelectListItem> _SelectListItems;
        public static IEnumerable<SelectListItem> SelectListItems
        {
            get
            {
                if (_SelectListItems == null)
                {
                    List<SelectListItem> items = new List<SelectListItem>();
                    items.Add(new SelectListItem { Text = KPSResource.NULL, Value = string.Empty });
                    byte[] keys = { 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 0 };
                    string[] KPSAdvice = { "正常，无症状和体征","能进行正常活动，有轻微症状和体征",
                                           "勉强可进行正常活动，有一些症状或体征","生活可自理，但不能维持正常生活工作",
                                           "生活能大部分自理，但偶尔需要别人帮助","常需人照料",
                                           "生活不能自理，需要特别照顾和帮助","生活严重不能自理",
                                           "病重，需要住院和积极的支持治疗","重危，临近死亡",
                                           "死亡"
                                         };
                    int i = -1;
                    foreach (byte key in keys)
                        items.Add(new SelectListItem
                        {
                            Text = KPSResource.ResourceManager.GetString("_" + key)+"（"+KPSAdvice[++i]+"）",
                            Value = key.ToString()
                        });
                    _SelectListItems = items;
                }
                return _SelectListItems;
            }
        }
    }
}